#include "WeatherData.hpp"

void Test()
{
  srand((unsigned int)time(nullptr));

  // 创建三种显示器
  CurrentConditionDisplay* current = new CurrentConditionDisplay();
  StatisticsDisplay* statistics = new StatisticsDisplay();
  ForecastDisplay* forecast = new ForecastDisplay();
  
  // 创建天气数据类
  WeatherData* data = new WeatherData(current, statistics, forecast);

  // 数据更新
  // for ( ; ; )
  // {
  //   data->MearsureChanged();
  //   sleep(5);
  // }

  data->MearsureChanged();

  delete current, statistics, forecast;
  delete data;
}

int main()
{
  Test();

  return 0;
}
